<!--
 * @description: 暗黑模式切换
 * @Author: Islands
 * @Date: 2024-06-17 15:28:59
 * @LastEditTime: 2024-06-18 12:18:03
-->
<script lang="ts" setup>
import { IconTooltip } from "@/components/SvgIcon";
import { useDark, useToggle } from "@vueuse/core";
const isDark = useDark();
const toggleDark = useToggle(isDark);
const toggleDarkClick = () => {
  toggleDark();
};
</script>
<template>
  <IconTooltip
    :onClick="toggleDarkClick"
    :tooltipTitle="isDark ? $t(`tooltip.light`) : $t(`tooltip.dark`)"
    :icon="isDark ? 'yueliang' : 'taiyang'"
  >
  </IconTooltip>
</template>
